#ifndef RING_BUFFER_H
#define RING_BUFFER_H

#include <cstdio>

template <class T>
class RingBuffer {
public: 
	RingBuffer(const unsigned int size);
	~RingBuffer();

	T& operator[](unsigned int i);
	void PushBack(const T& elem);
	T PopFront();

	void Dump();

private:
	
	T *buffer_;
	unsigned int size_;
	int cur_end_;
};

#endif
